package test0824;

public class Test02 {
    public static void main(String[] args) {
        String path = "http://localhost:8088/myweb/reg?name=zhangsan";
        String[] data = path.split("\\?");
        System.out.println(data[0]);
        System.out.println(data[1]);


        path = "http://localhost:8088/myweb/reg?name=zhangsan&pwd=123456&nick=san&age=16";
        String[] req = path.split("\\?");
        System.out.println(req[0]);
        System.out.println(req[1]);

        String[] dt = req[1].split("\\&");
        System.out.println(dt[0]);
        System.out.println(dt[1]);
        System.out.println(dt[2]);

    }
}
